package EjerciciosNoBoletin3.Ex1;

import java.awt.BorderLayout;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;

public class Ex1 {
	
	public Ex1(){
		this.montarVentana();
	}

	public void montarVentana(){
		
		JFrame principal = new JFrame();
		JLabel label = new JLabel("Nombre: ");
		JButton ver = new JButton("Ver");
		JTextField texto = new JTextField("",20);
		
		JPanel imagen = new JPanel();
//		imagen.add(new ScrollDemo("bird.gif"));
		
		
		ImageIcon image = new ImageIcon("youngdad.jpeg");

        JLabel label2 = new JLabel(image);
        JScrollPane scroll = new JScrollPane(imagen);
        imagen.add(scroll);
        
       
        
        
		
		JPanel panel = new JPanel();
		panel.add(label, BorderLayout.WEST);
		panel.add(texto,BorderLayout.CENTER);
		
		principal.add(panel, BorderLayout.NORTH);
		principal.add(ver, BorderLayout.CENTER);
		principal.add(imagen,  BorderLayout.SOUTH);
		
		principal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		principal.setVisible(true);
		principal.setSize(400, 400);
		
		
	}
	public static void main(String[] args){
		new Ex1();
	}
}
